a=(input())
b=a.split()
print(len(b))
print(a.count(' ')+1)
print(len(a))
